Optimal. Leaf size=101 \[ \frac{(b d-a e)^2 (B d-A e)}{e^4 (d+e x)}+\frac{(b d-a e) \log (d+e x) (-a B e-2 A b e+3 b B d)}{e^4}-\frac{b x (-2 a B e-A b e+2 b B d)}{e^3}+\frac{b^2 B x^2}{2 e^2} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.246652, antiderivative size = 101, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.05 \[ \frac{(b d-a e)^2 (B d-A e)}{e^4 (d+e x)}+\frac{(b d-a e) \log (d+e x) (-a B e-2 A b e+3 b B d)}{e^4}-\frac{b x (-2 a B e-A b e+2 b B d)}{e^3}+\frac{b^2 B x^2}{2 e^2} \]
Antiderivative was successfully verified.
[In] Int[((a + b*x)^2*(A + B*x))/(d + e*x)^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F] time = 0., size = 0, normalized size = 0. \[ \frac{B b^{2} \int x\, dx}{e^{2}} + \frac{\left (A b e + 2 B a e - 2 B b d\right ) \int b\, dx}{e^{3}} + \frac{\left (a e - b d\right ) \left (2 A b e + B a e - 3 B b d\right ) \log{\left (d + e x \right )}}{e^{4}} - \frac{\left (A e - B d\right ) \left (a e - b d\right )^{2}}{e^{4} \left (d + e x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((b*x+a)**2*(B*x+A)/(e*x+d)**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.140953, size = 98, normalized size = 0.97 \[ \frac{\frac{2 (b d-a e)^2 (B d-A e)}{d+e x}+2 b e x (2 a B e+A b e-2 b B d)+2 (b d-a e) \log (d+e x) (-a B e-2 A b e+3 b B d)+b^2 B e^2 x^2}{2 e^4} \]
Antiderivative was successfully verified.
[In] Integrate[((a + b*x)^2*(A + B*x))/(d + e*x)^2,x]
[Out]
_______________________________________________________________________________________
Maple [B] time = 0.013, size = 223, normalized size = 2.2 \[{\frac{{b}^{2}B{x}^{2}}{2\,{e}^{2}}}+{\frac{{b}^{2}Ax}{{e}^{2}}}+2\,{\frac{Bbax}{{e}^{2}}}-2\,{\frac{{b}^{2}Bdx}{{e}^{3}}}+2\,{\frac{\ln \left ( ex+d \right ) Aab}{{e}^{2}}}-2\,{\frac{\ln \left ( ex+d \right ) A{b}^{2}d}{{e}^{3}}}+{\frac{\ln \left ( ex+d \right ) B{a}^{2}}{{e}^{2}}}-4\,{\frac{\ln \left ( ex+d \right ) Babd}{{e}^{3}}}+3\,{\frac{\ln \left ( ex+d \right ){b}^{2}B{d}^{2}}{{e}^{4}}}-{\frac{{a}^{2}A}{e \left ( ex+d \right ) }}+2\,{\frac{Adab}{{e}^{2} \left ( ex+d \right ) }}-{\frac{{b}^{2}A{d}^{2}}{{e}^{3} \left ( ex+d \right ) }}+{\frac{Bd{a}^{2}}{{e}^{2} \left ( ex+d \right ) }}-2\,{\frac{ab{d}^{2}B}{{e}^{3} \left ( ex+d \right ) }}+{\frac{{b}^{2}B{d}^{3}}{{e}^{4} \left ( ex+d \right ) }} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((b*x+a)^2*(B*x+A)/(e*x+d)^2,x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.35124, size = 211, normalized size = 2.09 \[ \frac{B b^{2} d^{3} - A a^{2} e^{3} -{\left (2 \, B a b + A b^{2}\right )} d^{2} e +{\left (B a^{2} + 2 \, A a b\right )} d e^{2}}{e^{5} x + d e^{4}} + \frac{B b^{2} e x^{2} - 2 \,{\left (2 \, B b^{2} d -{\left (2 \, B a b + A b^{2}\right )} e\right )} x}{2 \, e^{3}} + \frac{{\left (3 \, B b^{2} d^{2} - 2 \,{\left (2 \, B a b + A b^{2}\right )} d e +{\left (B a^{2} + 2 \, A a b\right )} e^{2}\right )} \log \left (e x + d\right )}{e^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x + A)*(b*x + a)^2/(e*x + d)^2,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.207154, size = 321, normalized size = 3.18 \[ \frac{B b^{2} e^{3} x^{3} + 2 \, B b^{2} d^{3} - 2 \, A a^{2} e^{3} - 2 \,{\left (2 \, B a b + A b^{2}\right )} d^{2} e + 2 \,{\left (B a^{2} + 2 \, A a b\right )} d e^{2} -{\left (3 \, B b^{2} d e^{2} - 2 \,{\left (2 \, B a b + A b^{2}\right )} e^{3}\right )} x^{2} - 2 \,{\left (2 \, B b^{2} d^{2} e -{\left (2 \, B a b + A b^{2}\right )} d e^{2}\right )} x + 2 \,{\left (3 \, B b^{2} d^{3} - 2 \,{\left (2 \, B a b + A b^{2}\right )} d^{2} e +{\left (B a^{2} + 2 \, A a b\right )} d e^{2} +{\left (3 \, B b^{2} d^{2} e - 2 \,{\left (2 \, B a b + A b^{2}\right )} d e^{2} +{\left (B a^{2} + 2 \, A a b\right )} e^{3}\right )} x\right )} \log \left (e x + d\right )}{2 \,{\left (e^{5} x + d e^{4}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x + A)*(b*x + a)^2/(e*x + d)^2,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 4.73731, size = 148, normalized size = 1.47 \[ \frac{B b^{2} x^{2}}{2 e^{2}} + \frac{- A a^{2} e^{3} + 2 A a b d e^{2} - A b^{2} d^{2} e + B a^{2} d e^{2} - 2 B a b d^{2} e + B b^{2} d^{3}}{d e^{4} + e^{5} x} + \frac{x \left (A b^{2} e + 2 B a b e - 2 B b^{2} d\right )}{e^{3}} + \frac{\left (a e - b d\right ) \left (2 A b e + B a e - 3 B b d\right ) \log{\left (d + e x \right )}}{e^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x+a)**2*(B*x+A)/(e*x+d)**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.221662, size = 306, normalized size = 3.03 \[ \frac{1}{2} \,{\left (B b^{2} - \frac{2 \,{\left (3 \, B b^{2} d e - 2 \, B a b e^{2} - A b^{2} e^{2}\right )} e^{\left (-1\right )}}{x e + d}\right )}{\left (x e + d\right )}^{2} e^{\left (-4\right )} -{\left (3 \, B b^{2} d^{2} - 4 \, B a b d e - 2 \, A b^{2} d e + B a^{2} e^{2} + 2 \, A a b e^{2}\right )} e^{\left (-4\right )}{\rm ln}\left (\frac{{\left | x e + d \right |} e^{\left (-1\right )}}{{\left (x e + d\right )}^{2}}\right ) +{\left (\frac{B b^{2} d^{3} e^{2}}{x e + d} - \frac{2 \, B a b d^{2} e^{3}}{x e + d} - \frac{A b^{2} d^{2} e^{3}}{x e + d} + \frac{B a^{2} d e^{4}}{x e + d} + \frac{2 \, A a b d e^{4}}{x e + d} - \frac{A a^{2} e^{5}}{x e + d}\right )} e^{\left (-6\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x + A)*(b*x + a)^2/(e*x + d)^2,x, algorithm="giac")
[Out]